<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Affair_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-affair_id" data-rule="required" data-source="affair/index" class="form-control selectpage" name="row[affair_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Adjson')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <table class="table fieldlist" data-name="row[adjson]" data-template="row[adjson]tpl">
                <tr>
                    <td>{:__('adjson title')}</td>
<td>{:__('adjson intro')}</td>
<td>{:__('adjson types')}</td>
  <td>变量名（id）</td>
                    <td width="90">{:__('Operate')}</td>
                </tr>
                <tr><td colspan="5">
                <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a>
                <textarea name="row[adjson]" class="form-control hide" cols="30" rows="5"></textarea>
                </td></tr>
            </table>
            <script type="text/html" id="row[adjson]tpl">
                <tr>
                    <td><input type="text" name="<%=name%>[<%=index%>][title]" class="form-control" value="<%=row.title%>"/></td>
					<td><input type="text" name="<%=name%>[<%=index%>][intro]" class="form-control" value="<%=row.intro%>"/></td>
					<td>
						<select name="<%=name%>[<%=index%>][types]"  class="form-control">
							<option value="">&nbsp;&nbsp;&nbsp;&nbsp;请选择&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>
							<option value="text">文本填写</option>
							<option value="datetime">选择时间</option>
						</select>
					</td>
				 <td><input type="text" name="<%=name%>[<%=index%>][ids]" class="form-control" value="<%=row.ids%>"/></td>
                    <td width="90">
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                    </td>
                </tr>
            </script>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
